package com.heima.admin.service.impl;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heima.admin.mapper.AdAuthMapper;
import com.heima.admin.service.AdAuthService;
import com.heima.apis.user.IUserRealnameClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.AuthDto;
import com.heima.model.user.pojos.ApUser;
import com.heima.model.user.pojos.ApUserRealname;
import com.heima.model.wemedia.dtos.WmUserDto;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

@Service
public class AdAuthServiceImpl extends ServiceImpl<AdAuthMapper, AuthDto> implements AdAuthService {
    @Autowired
    private IUserRealnameClient iUserRealnameClient;

    /**
     * 实现Amidn端用户审核的分页查询认证列表
     *
     * @param dto
     * @return
     */
    public ResponseResult list(@RequestBody AuthDto dto) {
        return iUserRealnameClient.list(dto);
    }

    /**
     * 实现Amidn端用户审核的审核失败功能
     *
     * @param dto
     * @return
     */
    @Override
    public ResponseResult authFail(AuthDto dto) {
        return iUserRealnameClient.authFail(dto);
    }

    /**
     * 实现Amidn端用户审核的审核成功功能
     *
     * @param dto
     * @return
     */
    @Override
    public ResponseResult authPass(AuthDto dto) {
        return iUserRealnameClient.authPass(dto);
    }
}
